

#pragma once

#include "Material.h"
#include "LinearInterpolation.h"

class Function;

class PyrolysisGasPropertyMaterial : public Material
{
public:
	PyrolysisGasPropertyMaterial(const InputParameters & parameters);

protected:
	virtual void initQpStatefulProperties();
	virtual void computeQpProperties();

private:
  const  MaterialProperty<Real> & _porosity;
  const MaterialProperty<Real> & _permeability;
  const MaterialProperty<Real> & _R;
   MaterialProperty<Real> & _rhog;
   MaterialProperty<Real> & _mg_x;
   MaterialProperty<Real> & _mg_y;
   MaterialProperty<Real> & _mg_z;
   MaterialProperty<Real> & _cpg;
   MaterialProperty<Real> & _viscosity;
   MaterialProperty<Real> & _hg;
  const VariableValue  & _T_value;
  const VariableValue  & _P_value;
  const VariableGradient &  _gradient_T_value;
  const VariableGradient &  _gradient_P_value;

  LinearInterpolation  _func_cpg_T;
  LinearInterpolation  _func_viscosity_T;
  LinearInterpolation  _func_hg_T;

  std::vector<Real>  _cpg_list; //to get list of cpg
  std::vector<Real>  _cpgT_list; //to get T list of cpg
  std::vector<Real>  _viscosity_list; //to get list of viscosity
  std::vector<Real>  _viscosityT_list; //to get T list of viscosity
  std::vector<Real>  _hg_list;
  std::vector<Real>  _hgT_list;
};

template<>
InputParameters validParams<PyrolysisGasPropertyMaterial>();


